import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import Login from "../views/login/index.vue";
import Home from "../views/home/index.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Home",
    component: Home,
    children: [
      {
        path: "/",
        component: () => import("../views/home/data/index.vue"),
      },
      {
        path: "list",
        component: () => import("../views/device/list/index.vue"),
      },
      {
        path: "configure",
        component: () => import("../views/device/configure/index.vue"),
      },
      {
        path: "stock",
        component: () => import("../views/device/stock/index.vue"),
      },
      {
        path: "replenish",
        component: () => import("../views/device/replenish/index.vue"),
      },
      {
        path: "replenish_edit",
        component: () => import("../views/device/replenish/edit.vue"),
      },
      {
        path: "record",
        component: () => import("../views/device/record/index.vue"),
      },
      {
        path: "record_info",
        component: () => import("../views/device/record/info.vue"),
      },
      {
        path: "circuit",
        component: () => import("../views/device/circuit/index.vue"),
      },
      {
        path: "sale",
        component: () => import("../views/goods/sale/index.vue"),
      },
      {
        path: "for_sale",
        component: () => import("../views/goods/sale/for_sale.vue"),
      },
      {
        path: "public",
        component: () => import("../views/goods/public/index.vue"),
      },
      {
        path: "batch",
        component: () => import("../views/goods/batch/index.vue"),
      },
      {
        path: "order_list",
        component: () => import("../views/order/order_list/index.vue"),
      },
      {
        path: "refund",
        component: () => import("../views/order/refund/index.vue"),
      },
      {
        path: "message",
        component: () => import("../views/order/message/index.vue"),
      },
      {
        path: "blacklist",
        component: () => import("../views/order/blacklist/index.vue"),
      },
      {
        path: "add_blacklist",
        component: () => import("../views/order/blacklist/addBlacklist.vue"),
      },
      {
        path: "complaint",
        component: () => import("../views/order/complaint/index.vue"),
      },
      {
        path: "price_strategy",
        component: () => import("../views/strategy/priceStrategy/index.vue"),
      },
      {
        path: "price_strategy_edit",
        component: () => import("../views/strategy/priceStrategy/edit.vue"),
      },
      {
        path: "warning_strategy",
        component: () => import("../views/strategy/warningStrategy/index.vue"),
      },
      {
        path: "warning_strategy_edit",
        component: () => import("../views/strategy/warningStrategy/edit.vue"),
      },
      {
        path: "field",
        component: () => import("../views/strategy/field/index.vue"),
      },
      {
        path: "abnormal",
        component: () => import("../views/order/abnormal/index.vue"),
      },
      {
        path: "advertising_manage",
        component: () => import("../views/advertising/manage/index.vue"),
      },
      {
        path: "advertising_strategy",
        component: () => import("../views/advertising/manage/strategy.vue"),
      },
      {
        path: "add_strategy",
        component: () => import("../views/advertising/manage/addStrategy.vue"),
      },
      {
        path: "advertising_revenue",
        component: () => import("../views/advertising/revenue/index.vue"),
      },
      {
        path: "tax_process",
        component: () => import("../views/advertising/revenue/taxProcess.vue"),
      },
      {
        path: "using_balance",
        component: () =>
          import("../views/advertising/revenue/usingBalance.vue"),
      },
      {
        path: "monitor",
        component: () => import("../views/monitor/index.vue"),
      },
      {
        path: "sales_statistics",
        component: () =>
          import("../views/dataCenter/salesStatistics/index.vue"),
      },
      {
        path: "profit_analysis",
        component: () =>
          import("../views/dataCenter/devProfitAnalysis/index.vue"),
      },
      {
        path: "single_data_analysis",
        component: () =>
          import("../views/dataCenter/singleDataAnalysis/index.vue"),
      },
      {
        path: "alarm-monitoring",
        component: () => import("../views/monitoring/index.vue"),
      },
      {
        path: "information",
        component: () => import("../views/finance/settlement/index.vue"),
      },
      {
        path: "settlement",
        component: () => import("../views/finance/settlement/settlement.vue"),
      },
      {
        path: "wechat_payment",
        component: () =>
          import("../views/finance/settlement/wechatPayment.vue"),
      },
      {
        path: "alipay-payment",
        component: () =>
          import("../views/finance/settlement/alipayPayment.vue"),
      },
      {
        path: "cost",
        component: () => import("../views/finance/cost/index.vue"),
      },
      {
        path: "order",
        component: () => import("../views/finance/cost/order.vue"),
      },
      {
        path: "transaction",
        component: () => import("../views/finance/cost/transaction.vue"),
      },
      {
        path: "invoice",
        component: () => import("../views/finance/cost/invoice.vue"),
      },
      {
        path: "equip-identity-fee",
        component: () => import("../views/finance/cost/fee.vue"),
      },
      {
        path: "card-renew",
        component: () => import("../views/finance/cost/renew.vue"),
      },
      {
        path: "commisssion",
        component: () => import("../views/finance/commission/index.vue"),
      },
      {
        path: "card-commission",
        component: () => import("../views/finance/cardCommission/index.vue"),
      },
      {
        path: "product-analysis",
        component: () =>
          import("../views/dataCenter/productAnalysis/index.vue"),
      },
      {
        path: "product-analysis-look",
        component: () => import("../views/dataCenter/productAnalysis/look.vue"),
      },
      {
        path: "product-analysis-details",
        component: () =>
          import("../views/dataCenter/productAnalysis/details.vue"),
      },
      {
        path: "product-ranking",
        component: () =>
          import("../views/dataCenter/productSalesRanking/index.vue"),
      },
      {
        path: "system-config",
        component: () => import("../views/system/systemConfig/index.vue"),
      },
      {
        path: "role-list",
        component: () => import("../views/system/roleList/index.vue"),
      },
      {
        path: "role-add",
        component: () => import("../views/system/roleList/roleAdd.vue"),
      },
      {
        path: "associate-devices",
        component: () =>
          import("../views/system/roleList/associateDevices.vue"),
      },
      {
        path: "qualification",
        component: () => import("../views/system/qualification/index.vue"),
      },
      {
        path: "payConfig",
        component: () => import("../views/system/payConfig/index.vue"),
      },
      {
        path: "edit-merchant",
        component: () => import("../views/system/payConfig/EditMerchant.vue"),
      },
      {
        path: "role-permission",
        component: () => import("../views/system/rolePermission/index.vue"),
      },
      {
        path: "add-role-permission",
        component: () =>
          import("../views/system/rolePermission/addPermission.vue"),
      },
      {
        path: "log",
        component: () => import("../views/system/log/index.vue"),
      },
      {
        path: "white-list",
        component: () => import("../views/system/whiteList/index.vue"),
      },
      {
        path: "equipment-list",
        component: () => import("../views/system/equipmentList/index.vue"),
      },
      {
        path: "equipment-detail",
        component: () =>
          import("../views/system/equipmentList/equipmentDetai.vue"),
      },
      {
        path: "product-list",
        component: () => import("../views/system/productList/index.vue"),
      },
      {
        path: "pickup-cards-list",
        component: () => import("../views/system/pickupCardsList/index.vue"),
      },
      {
        path: "add-pickup-card",
        component: () =>
          import("../views/system/pickupCardsList/addPickCard.vue"),
      },
      {
        path: "user-list",
        component: () => import("../views/userManage/userList/index.vue"),
      },
      {
        path: "user-add",
        component: () => import("../views/userManage/userList/userAdd.vue"),
      },
      {
        path: "user-permission",
        component: () => import("../views/userManage/userPermission/index.vue"),
      },
      {
        path: "add-role-permission",
        component: () =>
          import("../views/userManage/userPermission/addPermission.vue"),
      },
      {
        path: "data",
        component: () => import("../views/userManage/DataOverview/index.vue"),
      },
      {
        path: "data-statistics",
        component: () =>
          import("../views/system/pickupCardsList/dataStatistics.vue"),
      },
    ],
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
  // ... 其他路由
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
